package com.huawei123.hasee.mynavigationview_view.Toolber_view;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

import com.huawei123.hasee.mynavigationview_view.R;

/**
 * 项目名称：MyNavigationView_view
 * 类描述：随着窗口SrollView滑动显示，隐藏
 * 创建人：hasee
 * 创建时间：2017/5/29 22:31
 * 修改人：hasee
 * 修改时间：2017/5/29 22:31
 * 修改备注：
 */
public class TowToolberActivity extends AppCompatActivity implements MyScrollView.MyScrollViewChangeListener {

    public Toolbar mTB_tow;
    public com.huawei123.hasee.mynavigationview_view.Toolber_view.MyScrollView mSV;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //        this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏
        setContentView(R.layout.activity_towtoolber);
        mTB_tow = (Toolbar) this.findViewById(R.id.mTB_tow);
        setSupportActionBar(mTB_tow);

        mSV = (MyScrollView) findViewById(R.id.mSV_scrollView);
        mSV.setTranslucentListener(this);
    }

    @Override
    public void scrollChange(float transparent) {
        mTB_tow.setAlpha(transparent);
    }
}
